1. Field of the Invention
The present invention relates to optical arithmetic methods and devices, and in particular to an optical method and device for converting residue numbers into positionally notated numbers.
2. Description of the Prior Art
An alternative to binary representation of data which is currently employed in electronic computers is the representation of data by residue numbers. The representation of data by residue numbers permits computations to be undertaken by means of residue arithmetic which has the significant advantage that no carry is necessary for the calculations, thereby permitting the calculations to be carried out at significantly higher speeds.
An overview of residue arithmetic is found, for example, in Applied Optics, Vol. 18, January 1979 at pages 149-162. Briefly described, residue arithmetic utilizes a plurality of modules M.sub.i, where i=1, 2, 3 . . . N, with the modules M.sub.i being relatively prime numbers, that is, having no common factors. The number of modules M.sub.i may be any selected integer, with a greater number of modules providing a residue representation of greater capacity. The residue representation of a number Z is obtained by dividing Z by each of the prime number modules M.sub.i. The respective remainders R.sub.i of each division operation are defined as the residue numbers with the residue number R.sub.i for Z being the least positive integer remainder of the division of Z by M.sub.i. The highest number Z.sub.max unambiguously representable by a residue number is the product of all of the prime number modules M.sub.i which are utilized, so that: ##EQU1##
As stated above, residue representation has the advantage that no carry must be undertaken between the individual places of the numbers because only the residue numbers (that is, the remainders) need be retained for the various arithmetic operations, with the absolute value of the number represented by residue numbers not being utilized. Moreover, the arithmetic operations performed on the residue numbers which represent a decimal number can be undertaken in parallel and can therefore proceed simultaneously, thereby achieving a significant increase in the computational speed in comparison to binary operations.
An embodiment for physically representing the residue numbers which correspond to a decimal number and for performing arithmetic operations on the residue numbers in parallel is described in the aforementioned excerpt from Applied Optics, wherein each possible residue number value for a place of the corresponding decimal number has one light path allocated thereto. This requires an extremely large number of parallel light transmission channels, however, this disadvantage is balanced by the very simple drive means which requires only "on" or "off" operations for each light path. This type of spatial modulation is also referred to as "position notation," with a "positionally notated number" being a number which is represented by means of position notation.
An arithmetic operation can be relatively simply executed by means of the above embodiment by means of the interchange of a plurality of light paths, which can be undertaken at one level because the light beams can penetrate one another. Moreover, because only the inputs and outputs of the embodiment are actually through-connected, a particularly fast calculation can be achieved. The combination of residue representation of data and optical position notation thus results in extremely high computational speeds.
A component for realizing linear functions of a variable utilizing residue numbers is described in the above-identified article in Applied Optics. Given such linear functions of a variable such as, for example, addition or multiplication with a constant, a residue of the function value is unambiguously allocated to each residue of the argument. Thus, the value set of the function is just as large as the value set of the argument. With the utilization of spatial position notation, one arithmetic component must exist for each place, that is, for each prime number module, with the arithmetic element exhibiting a number of inputs and outputs which is equal to the number of possible residue values which may occur at that place. As described in the Applied Optics article, a linear function can be realized by means of simply interchanging the outputs relative to the inputs of the component. Accordingly, such a linear function can be realized by means of components with a fixed map of connections between the inputs and the outputs of the device.
Such an interchange of the position of the entering and exiting light can be achieved by means of light conductors or by deflection of the entering light beams by means of mirrors, grids or prisms. Such a device can function much faster than electronic arithmetic devices, because an arithmetic operation lasts only as long as is required for the light to propagate from the input to the output.
For realizing linearly variable functions such as, for example, addition and multiplication with variables instead of with constants, the map of the device must be variable as well. As further described in the Applied Optics article, a device for addition and multiplication of two numbers by means of residue representation utilizing position notation can be realized in the form of a surface light conductor of rectangular shape into which narrow diagonally proceeding regions are built having indices of refraction which can be varied so that total reflection can occur in these regions. When the regions are selectively disposed, various interchanges of the positions of the light between the input and output can be obtained depending upon which region has been switched to total reflection. Switching of the index of refraction to values less than that of the light conductor can be undertaken electrically or electro-optically, however, it is also possible to switch these regions by means of light beams such as, for example, in a gallium arsenide light conductor in which the index of refraction is altered due to the incidence of a control light beam as a result of the destruction of excitons. Such a switching means is described in Applied Physics Letters 35 (1979) at pages 451-453.